home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / necko / nsICookieManager2.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  6KB  |  143 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsICookieManager2.idl
  3.  */
  4.  
  5. #ifndef __gen_nsICookieManager2_h__
  6. #define __gen_nsICookieManager2_h__
  7.  
  8.  
  9. #ifndef __gen_nsICookieManager_h__
  10. #include "nsICookieManager.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsICookie2; /* forward declaration */
  18.  
  19.  
  20. /* starting interface:    nsICookieManager2 */
  21. #define NS_ICOOKIEMANAGER2_IID_STR "3e73ff5f-154e-494f-b640-3c654ba2cc2b"
  22.  
  23. #define NS_ICOOKIEMANAGER2_IID \
  24.   {0x3e73ff5f, 0x154e, 0x494f, \
  25.     { 0xb6, 0x40, 0x3c, 0x65, 0x4b, 0xa2, 0xcc, 0x2b }}
  26.  
  27. /** 
  28.  * Additions to the frozen nsICookieManager
  29.  */
  30. class NS_NO_VTABLE nsICookieManager2 : public nsICookieManager {
  31.  public: 
  32.  
  33.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICOOKIEMANAGER2_IID)
  34.  
  35.   /**
  36.    * Add a cookie. nsICookieService is the normal way to do this. This
  37.    * method is something of a backdoor.
  38.    *
  39.    * @param aDomain
  40.    *        the host or domain for which the cookie is set. presence of a
  41.    *        leading dot indicates a domain cookie; otherwise, the cookie
  42.    *        is treated as a non-domain cookie. see RFC2109.
  43.    * @param aPath
  44.    *        path within the domain for which the cookie is valid
  45.    * @param aName
  46.    *        cookie name
  47.    * @param aValue
  48.    *        cookie data
  49.    * @param aSecure
  50.    *        true if the cookie should only be sent over a secure connection.
  51.    * @param aIsSession
  52.    *        true if the cookie should exist for the current session only.
  53.    * @param aExpiry
  54.    *        expiration date, in seconds since the epoch. only relevant if
  55.    *        aIsSession is false.
  56.    */
  57.   /* void add (in AUTF8String aDomain, in AUTF8String aPath, in ACString aName, in ACString aValue, in boolean aSecure, in boolean aIsSession, in PRInt64 aExpiry); */
  58.   NS_IMETHOD Add(const nsACString & aDomain, const nsACString & aPath, const nsACString & aName, const nsACString & aValue, PRBool aSecure, PRBool aIsSession, PRInt64 aExpiry) = 0;
  59.  
  60.   /**
  61.    * Find whether a matching cookie already exists, and how many cookies
  62.    * a given host has already set. This is useful when e.g. prompting the
  63.    * user whether to accept a given cookie.
  64.    *
  65.    * @param aCookie
  66.    *        the cookie to look for
  67.    * @param aCountFromHost
  68.    *        the number of cookies found whose hosts are the same as, or
  69.    *        subdomains of, the host field of aCookie
  70.    *
  71.    * @return true if a cookie was found which matches the host, path, and name
  72.    *         fields of aCookie
  73.    */
  74.   /* boolean findMatchingCookie (in nsICookie2 aCookie, out unsigned long aCountFromHost); */
  75.   NS_IMETHOD FindMatchingCookie(nsICookie2 *aCookie, PRUint32 *aCountFromHost, PRBool *_retval) = 0;
  76.  
  77. };
  78.  
  79. /* Use this macro when declaring classes that implement this interface. */
  80. #define NS_DECL_NSICOOKIEMANAGER2 \
  81.   NS_IMETHOD Add(const nsACString & aDomain, const nsACString & aPath, const nsACString & aName, const nsACString & aValue, PRBool aSecure, PRBool aIsSession, PRInt64 aExpiry); \
  82.   NS_IMETHOD FindMatchingCookie(nsICookie2 *aCookie, PRUint32 *aCountFromHost, PRBool *_retval); 
  83.  
  84. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  85. #define NS_FORWARD_NSICOOKIEMANAGER2(_to) \
  86.   NS_IMETHOD Add(const nsACString & aDomain, const nsACString & aPath, const nsACString & aName, const nsACString & aValue, PRBool aSecure, PRBool aIsSession, PRInt64 aExpiry) { return _to Add(aDomain, aPath, aName, aValue, aSecure, aIsSession, aExpiry); } \
  87.   NS_IMETHOD FindMatchingCookie(nsICookie2 *aCookie, PRUint32 *aCountFromHost, PRBool *_retval) { return _to FindMatchingCookie(aCookie, aCountFromHost, _retval); } 
  88.  
  89. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  90. #define NS_FORWARD_SAFE_NSICOOKIEMANAGER2(_to) \
  91.   NS_IMETHOD Add(const nsACString & aDomain, const nsACString & aPath, const nsACString & aName, const nsACString & aValue, PRBool aSecure, PRBool aIsSession, PRInt64 aExpiry) { return !_to ? NS_ERROR_NULL_POINTER : _to->Add(aDomain, aPath, aName, aValue, aSecure, aIsSession, aExpiry); } \
  92.   NS_IMETHOD FindMatchingCookie(nsICookie2 *aCookie, PRUint32 *aCountFromHost, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->FindMatchingCookie(aCookie, aCountFromHost, _retval); } 
  93.  
  94. #if 0
  95. /* Use the code below as a template for the implementation class for this interface. */
  96.  
  97. /* Header file */
  98. class nsCookieManager2 : public nsICookieManager2
  99. {
  100. public:
  101.   NS_DECL_ISUPPORTS
  102.   NS_DECL_NSICOOKIEMANAGER2
  103.  
  104.   nsCookieManager2();
  105.  
  106. private:
  107.   ~nsCookieManager2();
  108.  
  109. protected:
  110.   /* additional members */
  111. };
  112.  
  113. /* Implementation file */
  114. NS_IMPL_ISUPPORTS1(nsCookieManager2, nsICookieManager2)
  115.  
  116. nsCookieManager2::nsCookieManager2()
  117. {
  118.   /* member initializers and constructor code */
  119. }
  120.  
  121. nsCookieManager2::~nsCookieManager2()
  122. {
  123.   /* destructor code */
  124. }
  125.  
  126. /* void add (in AUTF8String aDomain, in AUTF8String aPath, in ACString aName, in ACString aValue, in boolean aSecure, in boolean aIsSession, in PRInt64 aExpiry); */
  127. NS_IMETHODIMP nsCookieManager2::Add(const nsACString & aDomain, const nsACString & aPath, const nsACString & aName, const nsACString & aValue, PRBool aSecure, PRBool aIsSession, PRInt64 aExpiry)
  128. {
  129.     return NS_ERROR_NOT_IMPLEMENTED;
  130. }
  131.  
  132. /* boolean findMatchingCookie (in nsICookie2 aCookie, out unsigned long aCountFromHost); */
  133. NS_IMETHODIMP nsCookieManager2::FindMatchingCookie(nsICookie2 *aCookie, PRUint32 *aCountFromHost, PRBool *_retval)
  134. {
  135.     return NS_ERROR_NOT_IMPLEMENTED;
  136. }
  137.  
  138. /* End of implementation class template. */
  139. #endif
  140.  
  141.  
  142. #endif /* __gen_nsICookieManager2_h__ */
  143.